package com.jt.auth.service;

import com.jt.auth.pojo.User;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

import java.util.List;

@FeignClient(value = "sca-system",contextId = "RemoteUserService")
@RequestMapping("/user")
public interface RemoteUserService {
    @GetMapping("/login/{username}")
    User SelectUserByUsername(
            @PathVariable("username") String username);

    @GetMapping("/permission/{userId}")
    List<String> selectUserPermissions(
            @PathVariable("userId")Long userId);
}
